<HTML>
<HEAD>
<TITLE>Admin</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="../css/css.css" rel=stylesheet>
<script type='text/javascript' src="../js/islogin.js" charset="gb2312"></script>
</HEAD>
<?php
include('../../inc/global.inc');
if($_GET['del_act']){
$urls=$_SERVER['HTTP_REFERER'];
mysql_query("delete from job_class where id='".$_GET['del_id']."'");
echo "<script>location='".$urls."';</script>";
}
?>
<BODY>
<center>
  <table width="480" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td height="25" bgcolor="#EEEEF9" style="padding-left:5px;">职能职位分类&nbsp;&nbsp;<a href="javascript:history.go(-1)">返回</a></td>
    </tr>
  </table>
  <table width="480" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td width="19%" height="30" align="center" bgcolor="#8DA8CF">编号</td>
      <td width="48%" align="center" bgcolor="#8DA8CF">分类名称</td>
      <td width="33%" align="center" bgcolor="#8DA8CF"><a href="type_modify.php?tj=ok&id=<?=$_GET[id]?>">添加分类</span></a></td>
    </tr>
<?php
if($_GET[id]){
$sql="select * from job_class where j_c_id='".$_GET['id']."' order by id asc";
}else{
$sql="select * from job_class where j_c_id=0 order by id asc";}
$rs=mysql_query($sql);
$i=1;
while($row=mysql_fetch_array($rs)){
$color=($i%2)?"#FFFFFF":"#eeeeee";
$rs2=mysql_query("select * from job_class where j_c_id='".$row['id']."'");
$row2=mysql_fetch_array($rs2);
$num=mysql_num_rows($rs2);
?>
    <tr bgcolor=<?=$color?>>
      <td height="25" align="center"><?=$i?></td>
	  <td align="center"><?=$row[j_c_name]?>(<a href='type.php?id=<?=$row['id']?>'><font color='red'><?=$num?></font></a>)</td>
      <td align="center"><a href="type_modify.php?xg=ok&xg_id=<?=$row['id']?>">编辑</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="type.php?del_act=ok&del_id=<?=$row['id']?>" onClick="return del()">删除</a></td>
    </tr>
<?php
$i++;}
?>
  </table>
</center>
</BODY>
</HTML>
